Skip to content

Remove secrets from Tracks demo#371

Open
mokagio wants to merge 4 commits into
trunkfrom
ainfra-2679-remove-secrets-from-tracks-demo
Open

Remove secrets from Tracks demo#371
mokagio wants to merge 4 commits into
trunkfrom
ainfra-2679-remove-secrets-from-tracks-demo

Conversation

@mokagio

@mokagio mokagio commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Remove "secrets" from the demo app because they consisted only of the Sentry DSN and of an email address. The DSN is safe to keep public and we can use an already public email address.

Removing the secrets simplify the build process and the repo management. Given what was tracked wasn't really that secret-worthy and that we're talking of a demo app, I think the trade is more than favorable.

mokagio and others added 4 commits July 11, 2026 09:45
The `TracksDemo` project generated `Secrets.swift` at build time by copying
`Secrets.example.swift` via an "Add Sample Secrets" shell-script phase, and
gitignored the result.
That indirection only earns its place when it guards something sensitive, and
neither field is: the Sentry DSN is safe to expose by design, and the
crash-logging `TracksUser` email is a shared demo alias, not personal PII.

Commit `Secrets.swift` directly with `mobile+tracks-demo@automattic.com` and a
`DSN_TBD` placeholder, delete the example template, drop the copy phase from the
iOS and Mac targets, and remove the gitignore entry.

---

Generated with the help of Claude Code, https://claude.com/claude-code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The DSN is public by design (Sentry docs), so committing it directly is safe.

---

Generated with the help of Claude Code, https://claude.com/claude-code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`Secrets` no longer holds anything secret; both fields configure the demo's
Sentry crash logging.

---

Generated with the help of Claude Code, https://claude.com/claude-code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The gitignored-local-file pitfall no longer exists — demo config is now tracked
as `SentryConfig.swift`.

---

Generated with the help of Claude Code, https://claude.com/claude-code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mokagio mokagio self-assigned this Jul 11, 2026
@mokagio mokagio marked this pull request as ready for review July 11, 2026 04:40
Copilot AI review requested due to automatic review settings July 11, 2026 04:40

struct CrashLoggingDataSource: CrashLoggingDataProvider {
var sentryDSN: String = Secrets.sentryDsn
var sentryDSN: String = SentryConfig.sentryDsn

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed this to SentryConfig because the contents are no longer secret.

@mokagio mokagio requested a review from a team July 11, 2026 04:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the demo app’s previously “secret” configuration (Sentry DSN + demo email) and checks in a non-secret configuration file so the Tracks demo builds without any locally-generated secrets files or build-phase scripting.

Changes:

  • Replaces Secrets.swift / Secrets.example.swift with a committed SentryConfig.swift.
  • Removes the Xcode build phase that copied Secrets.example.swift into Secrets.swift.
  • Updates the demo crash logging data source and housekeeping docs/ignore rules accordingly.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
TracksDemo/TracksDemo.xcodeproj/project.pbxproj Renames the source file reference to SentryConfig.swift and removes the “Add Sample Secrets” shell script build phase.
TracksDemo/Shared/SentryConfig.swift Adds committed demo configuration for Sentry DSN and demo Tracks user.
TracksDemo/Shared/Secrets.example.swift Removes the example secrets template file (no longer needed).
TracksDemo/Shared/CrashLoggingDataSource.swift Switches from Secrets.* to SentryConfig.* for DSN and user data.
AGENTS.md Removes the note about Secrets.swift being gitignored.
.gitignore Stops ignoring Secrets.swift now that it’s no longer used.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +5
struct SentryConfig {
static let sentryDsn = "https://f60d42c1ce6c44cca339e4572feef2ef@o248881.ingest.sentry.io/5591863"
static let tracksUser = TracksUser(email: "mobile+tracks-demo@automattic.com")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a PR stacked on top of this one to tidy the variable name. I agree that sentryDSN should be the one in use, but changing it is out of scope for this particular PR.

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

@mokagio I've opened a new pull request, #372, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants